﻿using System;
using System.Collections.Generic;
using System.Text;

namespace System.Data.SugarClient.Soap.V1
{

	internal class V1GetUserIdAction : V1SessionAction
	{

		#region Constructors

		internal V1GetUserIdAction(
			SugarSoapV1.sugarsoap service,
			string session)
			: base(service, session) 
		{
		}

		#endregion

		protected override V1ActionResult ExecuteInner()
		{
			var result =
				this.SoapService.get_user_id(
					this.Session);

			return new V1GetUserIdActionResult(this, result);
		}

	}

	internal class V1GetUserIdActionResult : V1SessionActionResult, IGetUserIdActionResult
	{

		internal V1GetUserIdActionResult(
			V1GetUserIdAction action,
			string result)
			: base(action)
		{
			this._soapResult = result;
		}

		#region Fields

		private readonly string _soapResult;

		#endregion

		internal string SoapResult
		{
			get { return _soapResult; }
		}

		#region IGetUserIdActionResult メンバ

		public string Id
		{
			get { return this.SoapResult; }
		}

		#endregion

		public override bool Success
		{
			get
			{
				return true;
				// else return false;
			}
		}


		
	}

}
